package com.huangwei.service.impl;

import com.huangwei.dao.CarBandDao;
import com.huangwei.model.CarBand;
import com.huangwei.service.CarBandService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CarBandServiceImpl implements CarBandService {
    @Resource
    CarBandDao carBandDao;
    @Override
    public List<CarBand> getAllCarBands() {
        try {
            return carBandDao.queryAll();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public CarBand getOneBand(int bandId) {
        try {
            return carBandDao.queryOne(bandId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
